<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../common/head.jsp"%>

<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
    <title>患 者</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <meta name="description" content="">

    <link rel="stylesheet" href="/lib/weui.min.css">
    <link rel="stylesheet" href="/css/jquery-weui.css">
    <link rel="stylesheet" href="/css/home.css">
    <style>
        body{line-height: unset}
        .patients{color: #000;
            -webkit-tap-highlight-color: rgba(0,0,0,0);padding:8px 0px;border-bottom: lightgray dashed 1px}
        .weui-media-box_appmsg .weui-media-box__hd{margin-right:0.4em}
        .sub-title{font-size: 12px;color:#999}
        .weui-media-box__title{color:#4b4a48}
        .cha-way{position: absolute;right:0px;bottom: -3px;font-size: 11px}
        .info-block{position: relative; color: lightgray}
        .weui-cell__bd{font-size:0.8rem}
    </style>
</head>
<body>

<div class="weui-flex">
    <div class="weui-flex__item">
        <div class="weui-panel__ft">
            <a href="searchPatient" class="weui-cell weui-cell_access weui-cell_link" >
                <div class="weui-cell__bd">
                    <img src="/mod-page/images//userList.png" width="25px" style="vertical-align: bottom "/>
                    <span>全部患者</span>
                </div>
                <span class="weui-cell__ft">${patientCount}人</span>
            </a>
        </div>
    </div>
</div>

<div class="weui-panel">
    <div class="weui-panel__hd">最新患者</div>
    <div class="weui-panel__bd">
        <div class="weui-media-box weui-media-box_small-appmsg">
            <div class="weui-cells">
                <!-- 遍历最新患者列表 -->
                <c:forEach items="${patients}" var="patient">
                    <a href="/mod-page/im/user_chat.html?did=${doctorId}&pid=${patient.patientId}" class="patients weui-media-box_appmsg">
                        <div class="weui-media-box__hd">
                            <img class="weui-media-box__thumb" src="${patient.patientPicPath}" alt="">
                        </div>
                        <div class="weui-media-box__bd info-block" >
                            <h4 class="weui-media-box__title">
                                ${patient.patientname} <span class="sub-title">${patient.sex} ${patient.age}岁</span>
                                <span class="weui-media-box__title-after" style="font-size:10px">
                                    <c:if test="${patient.days==1}">
                                        今天<fmt:formatDate value="${patient.patientCreatedate}" pattern="HH:mm:ss"/>
                                    </c:if>
                                    <c:if test="${patient.days==2}">
                                        昨天<fmt:formatDate value="${patient.patientCreatedate}" pattern="HH:mm:ss"/>
                                    </c:if>
                                    <c:if test="${patient.days==3}">
                                        前天<fmt:formatDate value="${patient.patientCreatedate}" pattern="HH:mm:ss"/>
                                    </c:if>
                                    <c:if test="${patient.days>3}">
                                        <fmt:formatDate value="${patient.patientCreatedate}" pattern="MM-dd HH:mm:ss"/>
                                    </c:if>
                                </span>
                            </h4>
                            <p class="weui-media-box__desc" style="font-size: 11px;margin-top: 5px;">${patient.phone}</p>
                            <span class="cha-way">扫码关注</span>
                        </div>
                    </a>
                </c:forEach>
            </div>
        </div>
    </div>
</div>
<script src="/lib/jquery-2.1.4.js"></script>
<script src="/lib/fastclick.js"></script>
<script src="/js/home.js"></script>
<%--<img src="/mod-page/images/add.png">3--%>
</body>
</html>